var __defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__pow=Math.pow,__defNormalProp=(e,t,r)=>t in e?__defProp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,__spreadValues=(e,t)=>{for(var r in t||(t={}))__hasOwnProp.call(t,r)&&__defNormalProp(e,r,t[r]);if(__getOwnPropSymbols)for(var r of __getOwnPropSymbols(t))__propIsEnum.call(t,r)&&__defNormalProp(e,r,t[r]);return e},__spreadProps=(e,t)=>__defProps(e,__getOwnPropDescs(t)),__objRest=(e,t)=>{var r={};for(var n in e)__hasOwnProp.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&__getOwnPropSymbols)for(var n of __getOwnPropSymbols(e))t.indexOf(n)<0&&__propIsEnum.call(e,n)&&(r[n]=e[n]);return r},__async=(e,t,r)=>new Promise(((n,i)=>{var o=e=>{try{l(r.next(e))}catch(t){i(t)}},a=e=>{try{l(r.throw(e))}catch(t){i(t)}},l=e=>e.done?n(e.value):Promise.resolve(e.value).then(o,a);l((r=r.apply(e,t)).next())}));!function(){"use strict";const e=[{src:"wave.min.js",name:"Wave"},{src:"axe.min.js",name:"BrowserStack"}],t=[{url:"wave.webaim.org",name:"Wave"}],r=(t,r)=>{try{const n=[];return"childList"===r&&t.addedNodes.length&&t.addedNodes.forEach((t=>{const r=(t=>{if("script"===t.nodeName.toLowerCase()){const r=e.find((e=>t.src.includes(e.src)));if(r)return r}return"iframe"===t.nodeName.toLowerCase()&&t.title.toLowerCase().includes("equalweb")?{name:"EqualWeb"}:null})(t);r&&n.push(r)})),n}catch(n){return[]}},n="https://api.userway.org/api/",i="https://cdn77.api.userway.org/";var o=(e=>(e.Remediation="remediation",e.AriaEditor="aria-editor",e))(o||{}),a=(e=>(e.KeyboardNavEnabled="app-key-nav-enabled",e))(a||{});const l=(e,t)=>__async(this,null,(function*(){const{account:r}=UserWayWidgetApp.ContextHolder.config,i={date:(new Date).toISOString(),url:window.location.href,scannerName:e,a11yScore:t};yield fetch(`${n}scaner-activity/${r}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)}).catch((e=>{console.log(e)}))})),s=e=>{try{UserWayWidgetApp.getLib("scan_manager").accessibilityScore().then((t=>{l(e,t)}))}catch(t){console.log(t)}},u=document.documentElement,c={childList:!0,subtree:!0},d=new MutationObserver((e=>{const t=(e=>{const t=[];for(const n of e)t.push(...r(n,n.type));return t})(e)[0];t&&s(t.name)})),p=(e,t=["userway"])=>{const r=__spreadProps(__spreadValues({},e),{isUserWay:!0});t.forEach((e=>{let t=window.frames[e];if(!t||"function"!=typeof t.postMessage)try{t=document.querySelector(`iframe[name=${e}]`),t=t?t.contentWindow:null}catch(n){console.error(n)}t&&t.postMessage(r,"*")}))},m=(e,t,r={})=>{t||(t=window.getComputedStyle(e)),r=__spreadValues({skipStyleProperty:[]},r);return[{property:"display",hiddenValues:["none"]},{property:"visibility",hiddenValues:["hidden","collapse"]},{property:"opacity",hiddenValues:["0"]},{property:"filter",hiddenValues:["opacity(0)"]}].some((({property:e,hiddenValues:n})=>{var i;if(!t||!(e in t)||(null==(i=r.skipStyleProperty)?void 0:i.includes(e)))return!1;const o=t[e];return"string"==typeof o&&n.includes(o)}))},f="script, style, template, link, noscript, meta, iframe, base, area, br, col, colgroup, param, source, track, wbr, hr, path, circle, rect, ellipse, line, polygon, polyline, g",g=f+',[hidden], input[type="hidden"]';function h(e){return null==e?void 0:e.matches(g)}const b='\n a[href]:not([hidden]):not([inert]), \n area[href]:not([hidden]):not([inert]), \n audio[controls]:not([hidden]):not([inert]), \n button:not([disabled]):not([hidden]):not([inert]), \n details summary:not([hidden]):not([inert]), \n embed:not([hidden]):not([inert]),\n iframe:not([hidden]):not([inert]), \n img[usemap]:not([hidden]):not([inert]),\n input:not([disabled]):not([type="hidden"]):not([hidden]):not([inert]), \n select:not([disabled]):not([hidden]):not([inert]), \n textarea:not([disabled]):not([hidden]):not([inert]), \n video[controls]:not([hidden]):not([inert]), \n [contenteditable]:not([disabled]):not([hidden]):not([inert])\n'.trim().replace(/\s+/g," "),A=b+", [tabindex]:not([disabled]):not([hidden]):not([inert])",y={includeUWInert:!1},E='\n a[href]:not([hidden]),\n area[href]:not([hidden]),\n audio[controls]:not([hidden]),\n button:not([disabled]):not([hidden]),\n details summary:not([hidden]),\n embed:not([hidden]),\n iframe:not([hidden]),\n img[usemap]:not([hidden]),\n input:not([disabled]):not([type="hidden"]):not([hidden]),\n select:not([disabled]):not([hidden]),\n textarea:not([disabled]):not([hidden]),\n video[controls]:not([hidden]),\n [contenteditable]:not([disabled]):not([hidden])\n'.trim().replace(/\s+/g," ")+", [tabindex]:not([disabled]):not([hidden])";function v(e,t=y){const{includeUWInert:r}=t;return r?(null==e?void 0:e.matches(A))&&!(null==e?void 0:e.closest("[inert], [hidden]")):(null==e?void 0:e.matches(E))&&!(null==e?void 0:e.closest("[inert]:not([data-uw-inert]), [hidden]"))}const w=/^([\s\u00A0\u200B]| |​|​|​)*$/,_=e=>{return null!==(null==e?void 0:e.parentNode)&&!(!(t=e.textContent)||w.test(t));var t};function N(e,t={}){let r=!1;const n=n=>{if(n instanceof Document||n instanceof Text)return!0;if(!(n instanceof Element))return!1;if(h(n)&&!v(n))return!1;const i=window.getComputedStyle(n);if(m(n,i,t))return!1;if("contents"===i.display){if(!(e instanceof Element)||n!==e)return!0;for(let t=0;t{if(r||n.width>0&&n.height>0)return!1;if(_(e))return!1;const o="fixed"===i.position||"absolute"===i.position||"left"===i.float||"right"===i.float||"visible"!==i.overflowX||"visible"!==i.overflowY;for(let r=0;r{if(!(e instanceof Element))return!1;t||(t=e.getBoundingClientRect());let n=0,i=0;const o="fixed"===window.getComputedStyle(e).position,a=r||o;a?(n=window.innerHeight||document.documentElement.clientHeight,i=window.innerWidth||document.documentElement.clientWidth):(n=Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight),i=Math.max(document.body.scrollWidth,document.documentElement.scrollWidth,document.body.offsetWidth,document.documentElement.offsetWidth,document.body.clientWidth,document.documentElement.clientWidth));const l=a?0:window.scrollY,s=a?0:window.scrollX,u=t.top+l,c=t.bottom+l,d=t.left+s,p=t.right+s;return c<1||u>n||p<1||d>i})(n,o,t.checkOutOfWindow))&&(n.getClientRects().length>0||n instanceof HTMLElement&&(n.offsetWidth>0||n.offsetHeight>0)))};if(t.skipCheckingAncestors)return n(e);{let t=!0,r=e;for(;r&&r!==document.body&&t;)t=n(r),r=r.parentNode;return t}}function T(e,t){return!function(e){var t;const r='[aria-hidden="true"], [hidden], [inert]:not([data-uw-inert])';let n=e.closest(r);for(;n;){if("true"===n.getAttribute("aria-hidden")||n.hasAttribute("inert")&&!n.hasAttribute("data-uw-inert"))return!0;if("none"===window.getComputedStyle(n).display)return!0;n=(null==(t=n.parentElement)?void 0:t.closest(r))||null}return!1}(e)&&N(e,t)}const x=(e,t,r={includeTextFromVisuallyHiddenElements:!1})=>{var n;const{includeTextFromVisuallyHiddenElements:i}=r;for(let o=0;o{let n=t;return(t=x(e.childNodes,n,r)).replace(/\s+/g," ").trim()},L=e=>{let t=e.split(" "),r="";for(let n=0;ne.split(" ").reduce(((e,t)=>{const r=document.getElementById(t.trim());if(!r)return e;if(h(r)||"img"===r.tagName.toLowerCase())return e;const n=I(r);return n?e+" "+n:e}),"").trim(),S=(e,t={})=>{var r,n,i;let o=null!=(n=null==(r=e.getAttribute("aria-label"))?void 0:r.trim())?n:"";const a=!(null==(i=null==t?void 0:t.excludeAttribute)?void 0:i.includes("aria-describedby"))&&e.getAttribute("aria-describedby");if(o+=a?O(a):"",o)return o.toLowerCase();const l=e.getAttribute("aria-labelledby");if(l&&(o+=O(l)),o.trim())return o.toLowerCase();if(o=I(e),o.trim())return o.toLowerCase();if("INPUT"===e.tagName){const t=e;if(o=t.value||"",o.trim()&&t.type&&["button","submit","reset"].includes(t.type.toLowerCase()))return o.toLowerCase()}if(!e.hasChildNodes())return null;let s=e.querySelector('img, *[role="img"]');return s&&(o=C(s)||"",o.trim())?o.toLowerCase():null},C=e=>{const t=e.getAttribute("role");if("role"===t||"presentation"===t)return null;const r=e.alt;if(r&&r.trim())return r.trim();const n=e.getAttribute("aria-label");if(n&&n.trim())return n.trim();const i=e.getAttribute("aria-describedby");if(i){const e=O(i);if(e)return e}const o=e.getAttribute("aria-labelledby");if(o){let e=O(o);if(e)return e}return null},k=()=>"uw"+(~~(1e8*Math.random())).toString(16),R=(e,t="")=>{const r=document.createElement("span");return r.textContent=e,r.style="color: #ffffff!important;background: #000000!important;clip: rect(1px, 1px, 1px, 1px)!important;clip-path: inset(50%)!important;height: 1px!important;width: 1px!important;margin: -1px!important;overflow: hidden!important;padding: 0!important;position: absolute!important;",r.setAttribute("class",t),r.setAttribute("data-uw-reader-element",""),r.setAttribute("data-uw-rm-ignore",""),r},D=(e,t=0)=>{let r=3735928559^t,n=1103547991^t;for(let i,o=0;o>>16,2246822507)^Math.imul(n^n>>>13,3266489909),n=Math.imul(n^n>>>16,2246822507)^Math.imul(r^r>>>13,3266489909),4294967296*(2097151&n)+(r>>>0)},M=(e,t=!1)=>{var r;if("html"===e.nodeName.toLowerCase())return"/HTML";if("body"===e.nodeName.toLowerCase())return"/HTML/BODY";if("head"===e.nodeName.toLowerCase())return"/HTML/HEAD";let n=0;const i=null==(r=e.parentElement)?void 0:r.children;if(!i)return"";for(let o=0;o{const i=t[n],o=e.getAttribute(i)||"";return e.hasAttribute&&e.hasAttribute(i)&&""!==o?r+";"+n+":"+D(o):r}),"|"+r)}const U=new RegExp("^(data:)"),F=new RegExp("(.)(gif|jpe?g|tiff?|png|webp|bmp)","i"),W=e=>{if(U.test(e))return e;e&&(e=e.replace(/^(http|https)(:\/\/)/,"").replace(/^(www\.)/,""));const t=e.match(F);return(null==t?void 0:t.index)&&(null==t?void 0:t.length)?e.substring(0,t.index+t[0].length):e.split("?")[0]},$=e=>[].slice.call(document.querySelectorAll(e)),B=(e,t,r=!1)=>e.reduce(((e,n)=>{const i=r&&n.position?":nth-of-type("+n.position+")":"";return e+=n.tag+i+(n.idx>=t?">":" ")}),"").slice(0,-1),H=(e,t)=>{if(null===t)return!0;const r=e.innerText?D(e.innerText).toString():"";if(t.innerText.toString()!==r)return!1;const n=e.hasAttribute("href")?D(e.getAttribute("href")).toString():"";if(t.href&&t.href!==n)return!1;const i=e.hasAttribute("src")?D(e.getAttribute("src")).toString():"";return!t.src||t.src===i},V=(e,t=null,r)=>{const n=$(e);if(1===n.length){if(null==r.params)return n[0];if(H(n[0],t))return n[0]}if(n.length>1){if(null==r.params)return null;const e=n.filter((e=>H(e,t)));if(1===e.length)return e[0]}return null};var j=(e=>(e[e.Strict=0]="Strict",e[e.Medium=1]="Medium",e[e.Loose=2]="Loose",e))(j||{});const q={i:"innerText",s:"src",h:"href"},X=e=>{const[t,r]=e.split("|");let n={innerText:""};if(r){const[e,...t]=r.split(";");n.innerText=e,t.forEach((e=>{const[t,r]=e.split(":");n[q[t]]=r}))}return{xpath:t,params:n}},G=e=>{if("/HTML/BODY"===e)return $("html>body")[0];const{xpath:t,params:r}=X(e),n=((e,t)=>{const r=("/"===e[0]?e.slice(1):e).split("/");return r.map(((e,n)=>{const i=e.toLowerCase(),[,o,a]=i.match(/(\S+)\[(\S+)?\]/)||[,i],l=r.length-1===n,s={idx:n,tag:o};return a&&(s.position=+a),l&&t&&(s.params=t),s}))})(t,r);return((e,t=4)=>{let r=e.length-2-t;const n=e[e.length-1];let i;const o=n.params;if(r<0){i=B(e,0,!0);return V(i,o,n)||(i=B(e,0),V(i,o,n))}const a=a=>{for(r=e.length-2-t;r>=0;r--){i=a===j.Loose?B(e.slice(0,2).concat(...e.slice(-r-t)),e.length-t):B(e,e.length-t-r-1,a===j.Strict);const l=V(i,o,n);if(l)return l}},l=[j.Strict,j.Medium,j.Loose];for(let s=0;s{const{xpath:t,params:r}=X(e),n=document.evaluate(t,document,null,XPathResult.FIRST_ORDERED_NODE_TYPE,null).singleNodeValue;return n&&H(n,r)?n:null},z=(e,t)=>{new IntersectionObserver(((r,n)=>{for(const i of r)i.intersectionRatio>0&&(t(e),n.disconnect())})).observe(e)},Y=e=>{let t=e.closest("label"),r="";if(t){for(let e of t.childNodes)e.nodeType===Node.TEXT_NODE&&(r+=e.textContent);if(r.trim())return r.trim()}if(e.id){let t=(e=>{for(const t of document.querySelectorAll("label"))if(t.htmlFor===e)return t;return null})(e.id);if(t)return I(t,"")}const n=e.getAttribute("aria-label"),i=e.getAttribute("aria-labelledby");if(n)return n;if(i)return L(i);const o=e.getAttribute("title");if(o)return o;return I(e,"")||""},Z=[".uwy",".uwy *",".uw-sl *"],Q=["data-uw-ignore","data-uw-rm-ignore"],J=(e,t=3)=>{const r=(e,t)=>{if(t<1)return"";const n=e.childElementCount;let i="";return n||(i+=e.textContent),!i&&e.length&&(i+=e.nodeValue),n&&e.childNodes.length&&(i+=[...e.childNodes].map((e=>r(e,t-1))).join(" ")),i};return r(e,t)},ee=e=>e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'"),te=e=>{try{const t=new URL(e,document.baseURI);return["http:","https:"].includes(t.protocol)}catch(t){return!1}},re=e=>{if((e=e.trim().toLowerCase()).length<3||/^[\d\s]+$/.test(e)||/^[!"#$%&'()*+,\-./:;<=>?@\[\\\]^_`{|}~\s]+$/.test(e)||/^(((todo|untitled|new|default|test)(\s+page)?)|title|page)$/.test(e))return!1;if(!e.includes(" ")){if(new RegExp("(.)\\1{3,}").test(e))return!1}return!0},ne=e=>{const t=null==e?void 0:e.getAttribute("tabindex");if(null==t)return null;const r=parseInt(t,10);return Number.isNaN(r)?null:r};function ie(e){return e instanceof HTMLElement&&v(e)&&!function(e){return-1===ne(e)}(e)}function oe(e){ie(e)||e.setAttribute("tabindex","0")}const ae=e=>{if(e.disabled)return!1;const t=e.getAttribute("contenteditable");if(null!==t&&"false"!==t.toLowerCase())return!0;const r=e.nodeName.toLowerCase();return"textarea"===r||"input"===r&&e instanceof HTMLInputElement&&/^(?:text|email|number|search|tel|url|password|week|month|date)$/i.test(e.type)},le=e=>{if(e.nodeType!==Node.ELEMENT_NODE)return!1;if(ae(e))return!0;for(const t of e.querySelectorAll("*"))if(ae(t))return!0;return!1};var se=(e=>(e.enter="enter",e.space="space",e.tab="tab",e["tab-shift"]="tab-shift",e["tab+shift"]="tab+shift",e.esc="esc",e.home="home",e.end="end",e.pageUp="pageUp",e.pageDown="pageDown",e.arrowUp="arrowUp",e.arrowDown="arrowDown",e.arrowLeft="arrowLeft",e.arrowRight="arrowRight",e.printableChar="printableChar",e))(se||{});const ue=(e,t)=>e.key===t.key||e.code===t.code,ce=e=>ue(e,{key:" ",code:"Space"}),de=e=>ue(e,{key:"Enter",code:"Enter"}),pe=e=>ue(e,{key:"Escape",code:"Escape"}),me=e=>ue(e,{key:"Tab",code:"Tab"}),fe=e=>ue(e,{key:"Home",code:"Home"}),ge=e=>ue(e,{key:"End",code:"End"}),he=e=>ue(e,{key:"PageUp",code:"PageUp"}),be=e=>ue(e,{key:"PageDown",code:"PageDown"}),Ae=e=>ue(e,{key:"ArrowLeft",code:"ArrowLeft"}),ye=e=>ue(e,{key:"ArrowUp",code:"ArrowUp"}),Ee=e=>ue(e,{key:"ArrowRight",code:"ArrowRight"}),ve=e=>ue(e,{key:"ArrowDown",code:"ArrowDown"}),we=e=>1===e.key.length&&/\S/.test(e.key);function _e(e,t){let r;if(t.endsWith("+shift")?(r=!0,t=t.replace("+shift","")):t.endsWith("-shift")&&(r=!1,t=t.replace("-shift","")),void 0!==r&&r!==e.shiftKey)return!1;switch(t){case"enter":return de(e);case"space":return ce(e);case"esc":return pe(e);case"home":return fe(e);case"end":return ge(e);case"pageUp":return he(e);case"pageDown":return be(e);case"arrowUp":return ye(e);case"arrowDown":return ve(e);case"arrowLeft":return Ae(e);case"arrowRight":return Ee(e);case"tab":return me(e);case"printableChar":return we(e);default:return!1}}const Ne=e=>{e&&"function"==typeof e.click&&!le(e)&&e.addEventListener("keydown",(t=>{de(t)&&(t.preventDefault(),e.click())}))};function Te(e,t){if(0===e.length)return;const r=[];if("string"==typeof e[0]){for(const o of e)if("string"==typeof o){const e=Array.from((t||document).querySelectorAll(o));r.push(...e.filter((e=>e instanceof HTMLElement)))}}else t?r.push(...e.filter((e=>t.contains(e)))):r.push(...e);if(0===r.length)return;const n=(e,t)=>r=>{if(r instanceof KeyboardEvent){if(_e(r,se["tab+shift"])&&t instanceof HTMLElement)null==t||t.focus();else{if(!(_e(r,se["tab-shift"])&&e instanceof HTMLElement))return;null==e||e.focus()}return r.preventDefault()}},i=[];for(let o=0;o{r[0].focus()}),100),{terminate:()=>{for(let e=0;e{let t=e.parentElement;for(;t;){if(ie(t))return!0;t=t.parentElement}return!1},Ie=()=>__async(this,null,(function*(){return new Promise((e=>{const t=()=>{"complete"===document.readyState&&(document.removeEventListener("readystatechange",t),e())};document.addEventListener("readystatechange",t),t()}))}));function Le(e){return __async(this,null,(function*(){return new Promise((t=>{window.setTimeout((()=>{t()}),e)}))}))}const Oe=e=>{var t,r,n;try{let i;return i=e instanceof SVGAElement?null==(r=null==(t=e.href)?void 0:t.baseVal)?void 0:r.trim():null==(n=e.getAttribute("href"))?void 0:n.trim(),i?new URL(i,document.baseURI).href:""}catch(i){return""}},Se=e=>{const t=null==e?void 0:e.trim();return(null==t?void 0:t.length)?t.split("?")[0].split("#")[0]:""},Ce="REMEDIATION_KEYBOARD_NAVIGATION",ke="data-uw-rm-kbnav",Re=["link","button","menuitem","checkbox"],De="role",Me="click",Pe="anohref",Ue=["onclick"],Fe=["onkeydown","onkeyup","onkeypress"],We="REMEDIATION_POPUP",$e=["DIV","SECTION","DIALOG","ASIDE","FORM","ARTICLE"],Be="data-uw-cer-popup-wrapper",He="REMEDIATION_ELEMENT_FOCUS",Ve="data-uw-rm-outline",je=["data-uw-rm-ignore-focus-rule"],qe="2px",Xe="solid",Ge={AriaEditorValues:[],BrokenLink:[],Contrast:[],EmptyControls:[],ExternalLink:[],Forms:[],Headings:[],Language:[],MissingAlts:[],Pdfs:[],VagueLinks:[]},Ke=e=>__async(this,null,(function*(){const t=yield fetch(e),r=yield t.json();return __spreadValues(__spreadValues({},Ge),r)})),ze=UserWayWidgetApp.ContextHolder.config.remediation,Ye=UserWayWidgetApp.ContextHolder.config.tunings,Ze=UserWayWidgetApp.ContextHolder.config.services,Qe=UserWayWidgetApp.ContextHolder.config.imageAlt,Je=UserWayWidgetApp.ContextHolder.config.settings,{isMobile:et,language:tt}=UserWayWidgetApp.ContextHolder.config;let rt={};function nt(e){rt=__spreadValues({},e)}function it(){return rt}const ot=()=>__async(this,null,(function*(){if(null==ze?void 0:ze.consolidated){const e=yield Ke(ze.consolidated);return e.MissingAlts.reverse(),void nt(e)}nt(Ge)})),at=(e,t)=>{if(!t)return e;try{return parseInt(t,10)}catch(r){return e}};at(300,Ye.REMEDIATION_THROTTLE_DELAY),at(500,Ye.REMEDIATION_DEBOUNCE_DELAY),at(2e3,Ye.REMEDIATION_DEBOUNCE_MAX_WAIT);const lt="AUTO";var st=(e=>(e.TABINDEX="tabindex",e.ROLE="role",e.TYPE="type",e.SRC="src",e.ARIA_LEVEL="ariaLevel",e.ORIGINAL_ALT="originalAlt",e))(st||{}),ut=(e=>(e.UNKNOWN="UNKNOWN",e.NOT_ALLOWED="NOT_ALLOWED",e.TEXT_NODE="TEXT_NODE",e.LANDMARK="LANDMARK",e.CONTROL="CONTROL",e.HEADING="HEADING",e.HAS_ALT_DESCRIPTION="HAS_ALT_DESCRIPTION",e.COMPOSED_TEXT_NODES="COMPOSED_TEXT_NODES",e.IFRAME="IFRAME",e.HIDDEN_FOR_READER="HIDDEN_FOR_READER",e))(ut||{}),ct=(e=>(e.UNKNOWN="unknown",e.TEXT="text",e.IMAGE="image",e.HEADING="heading",e.FOOTER="footer",e.HEADER="header",e.NAV="nav",e.MAIN="main",e.FORM="form",e.LANDMARK="landmark",e.LINK="link",e.BUTTON="button",e.CHECKBOX="checkbox",e.RADIOBUTTON="radiobutton",e.INPUT="input",e.TEXTAREA="textarea",e.SELECT="select",e.ABBR="abbr",e.LIST_ITEM="list item",e))(ct||{});const dt="accessibility-tree-observer",pt=["uw-sl","uwy","uw-s10-reading-guide","uw-s12-tooltip"],mt=(e,t)=>t.ariaLabel?t.ariaLabel:t.ariaLabelledBy?L(t.ariaLabelledBy):I(e,""),ft={},gt=UserWayWidgetApp.getLib("accessibility_tree_walker");let ht,bt=[],At=1;const yt=(e,t)=>{var r;if(bt=[],(e=>{const t=3===e.nodeType;return pt.some((t=>!!e.closest&&e.closest(`.${t}`)))||!t&&e.hasAttribute("data-uw-rm-ignore")})(e)&&!t)return null;const n={node:e,type:gt.identifyElementType(e)},i=(e=>{if(!e||!e.type)return{};const{node:t}=e;return[ut.UNKNOWN,ut.NOT_ALLOWED,ut.TEXT_NODE].includes(e.type)?{uwAtoId:t.uwAtoId}:{tagName:t.tagName,tabindex:t.getAttribute("tabindex")||"",role:t.getAttribute("role")||"",ariaLevel:t.getAttribute("aria-level")||"",ariaLabel:t.getAttribute("aria-label")||"",ariaLabelledBy:t.getAttribute("aria-labelledby")||"",type:t.getAttribute("type")||"",uwAtoId:t.uwAtoId}})(n);ht=gt.identifyElementType(e);const o=ht===ut.HIDDEN_FOR_READER;let a,l;switch(bt=(e=>(e.tabindex&&bt.push({name:st.TABINDEX,value:e.tabindex}),e.role&&bt.push({name:st.ROLE,value:e.role}),e.type&&bt.push({name:st.TYPE,value:e.type}),e.ariaLevel&&bt.push({name:st.ARIA_LEVEL,value:e.ariaLevel}),bt))(i),o&&((e,t)=>{const r=e.cloneNode(!0);r.removeAttribute("aria-hidden"),ht=gt.identifyElementType(r),ht!==ut.UNKNOWN||"IMG"!==t.tagName&&"img"!==t.role||(ht=ut.HAS_ALT_DESCRIPTION)})(e,i),ht){case ut.TEXT_NODE:a=(e=>{const t=ct.TEXT;let r="";e.textContent&&(r=e.textContent.trim().replace(/(\n|\r\n)/g,"").replace(/\s+/g," "));const n={};return e.parentElement&&(n.parentXpath=M(e.parentElement)),{semanticType:t,textToRead:r,additionalParams:n}})(e),ft.parentXpath=null==(r=a.additionalParams)?void 0:r.parentXpath;break;case ut.COMPOSED_TEXT_NODES:a=((e,t)=>({semanticType:"LI"===t.tagName?ct.LIST_ITEM:ct.TEXT,textToRead:t.ariaLabel||I(e,"")}))(e,i);break;case ut.HIDDEN_FOR_READER:a={semanticType:ct.UNKNOWN,textToRead:""};break;case ut.HEADING:a=((e,t)=>({semanticType:ct.HEADING,textToRead:t.ariaLabel||I(e,"")}))(e,i);break;case ut.LANDMARK:a=(e=>{let t,r="";e.ariaLabel?r=e.ariaLabel:e.ariaLabelledBy&&(r=L(e.ariaLabelledBy));const{tagName:n}=e,{role:i}=e;return t="FOOTER"===n||"contentinfo"===i?ct.FOOTER:"HEADER"===n||"banner"===i?ct.HEADER:"FORM"===n||"form"===i?ct.FORM:"MAIN"===n||"main"===i?ct.MAIN:"NAV"===n||"navigation"===i?ct.NAV:ct.LANDMARK,{semanticType:t,textToRead:r}})(i);break;case ut.CONTROL:a=((e,t)=>{const{tagName:r,role:n,type:i,ariaLabel:o,ariaLabelledBy:a}=t;let l=!1,s="",u=ct.TEXT;return"menuitem"===n||"option"===n?(s=mt(e,t),l=!0):"link"===n||"A"===r&&!n?(u=ct.LINK,s=mt(e,t),l=!0):"button"===n||"BUTTON"===r?(u=ct.BUTTON,s=mt(e,t),l=!0):"INPUT"!==r||"button"!==i&&"submit"!==i&&"reset"!==i||(u=ct.BUTTON,o?s=o:a&&(s=L(a)),l=!0),l||(s=Y(e),"checkbox"===n||"INPUT"===r&&"checkbox"===i?u=ct.CHECKBOX:"radio"===n||"INPUT"===r&&"radio"===i?u=ct.RADIOBUTTON:"INPUT"===r&&(u=ct.INPUT),"TEXTAREA"===r&&(u=ct.TEXTAREA),"SELECT"===r&&(u=ct.SELECT)),{semanticType:u,textToRead:s}})(e,i);break;case ut.HAS_ALT_DESCRIPTION:a=((e,t,r)=>{const{tagName:n,role:i,ariaLabel:o}=t,a=e.getAttribute("alt")||"",l=e.getAttribute("title")||"",s=e.getAttribute("data-uw-rm-ima-original")||"";let u="",c=ct.TEXT;const d=r;return"IMG"!==n&&"img"!==i||(c=ct.IMAGE,d.push({name:st.SRC,value:e.src}),d.push({name:st.ORIGINAL_ALT,value:s}),u=o||a||s||u),"ABBR"===n&&(c=ct.ABBR,u=l),{semanticType:c,textToRead:u,attributesToReturn:d}})(e,i,bt),a.attributesToReturn&&(bt=a.attributesToReturn);break;case ut.UNKNOWN:a=((e,t)=>{let r=ct.TEXT;return"DIV"!==t.tagName||e.innerHTML||(r=ct.LANDMARK),{semanticType:r,textToRead:""}})(e,i);break;default:a={textToRead:"",semanticType:ct.TEXT}}return i.uwAtoId?l=i.uwAtoId:(l=At,At+=1,n.node.uwAtoId=l),__spreadValues({id:l,xpath:M(e),label:a.textToRead.replace(/\|/g,"").trim(),tagName:i.tagName||"",type:a.semanticType,hidden:o,attributes:bt,el:n.node},ft)},Et=UserWayWidgetApp.getLib("accessibility_tree_walker");let vt=[];const wt=()=>{let e=null;vt=[];do{const t=Et.getNextAccessibilityTreeNode(e);if(!t)break;const r=yt(t.node);r&&vt.push(r),e=t.node}while(e);vt=vt.map((e=>{const t=e,{el:r}=t;return __objRest(t,["el"])})),p({action:dt,type:"userway:ato-output:get",data:{nodes:vt,version:Date.now()}},["uwAccessibilityEditor"])},_t=()=>vt;var Nt="object"==typeof global&&global&&global.Object===Object&&global,Tt="object"==typeof self&&self&&self.Object===Object&&self,xt=Nt||Tt||Function("return this")(),It=xt.Symbol,Lt=Object.prototype,Ot=Lt.hasOwnProperty,St=Lt.toString,Ct=It?It.toStringTag:void 0;var kt=Object.prototype.toString;var Rt=It?It.toStringTag:void 0;function Dt(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Rt&&Rt in Object(e)?function(e){var t=Ot.call(e,Ct),r=e[Ct];try{e[Ct]=void 0;var n=!0}catch(o){}var i=St.call(e);return n&&(t?e[Ct]=r:delete e[Ct]),i}(e):function(e){return kt.call(e)}(e)}var Mt=/\s/;var Pt=/^\s+/;function Ut(e){return e?e.slice(0,function(e){for(var t=e.length;t--&&Mt.test(e.charAt(t)););return t}(e)+1).replace(Pt,""):e}function Ft(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}var Wt=/^[-+]0x[0-9a-f]+$/i,$t=/^0b[01]+$/i,Bt=/^0o[0-7]+$/i,Ht=parseInt;function Vt(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return null!=e&&"object"==typeof e}(e)&&"[object Symbol]"==Dt(e)}(e))return NaN;if(Ft(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Ft(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Ut(e);var r=$t.test(e);return r||Bt.test(e)?Ht(e.slice(2),r?2:8):Wt.test(e)?NaN:+e}var jt=function(){return xt.Date.now()},qt=Math.max,Xt=Math.min;function Gt(e,t,r){var n,i,o,a,l,s,u=0,c=!1,d=!1,p=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function m(t){var r=n,o=i;return n=i=void 0,u=t,a=e.apply(o,r)}function f(e){var r=e-s;return void 0===s||r>=t||r<0||d&&e-u>=o}function g(){var e=jt();if(f(e))return h(e);l=setTimeout(g,function(e){var r=t-(e-s);return d?Xt(r,o-(e-u)):r}(e))}function h(e){return l=void 0,p&&n?m(e):(n=i=void 0,a)}function b(){var e=jt(),r=f(e);if(n=arguments,i=this,s=e,r){if(void 0===l)return function(e){return u=e,l=setTimeout(g,t),c?m(e):a}(s);if(d)return clearTimeout(l),l=setTimeout(g,t),m(s)}return void 0===l&&(l=setTimeout(g,t)),a}return t=Vt(t)||0,Ft(r)&&(c=!!r.leading,o=(d="maxWait"in r)?qt(Vt(r.maxWait)||0,t):o,p="trailing"in r?!!r.trailing:p),b.cancel=function(){void 0!==l&&clearTimeout(l),u=0,n=s=i=l=void 0},b.flush=function(){return void 0===l?a:h(jt())},b}const Kt=new Set,zt="REMEDIATION_BROKEN_LINK",Yt="data-uw-rm-brl",Zt="data-uw-original-href";var Qt=(e=>(e.Processed="PR",e.BackEndContributed="BE",e.Fixed="FX",e.FixedByCorrection="CR",e))(Qt||{});const Jt=["localhost","userway.dev","linkedin.com","youtube.com"],er=e=>{if("a"!==e.tagName.toLowerCase())return!1;const t=e.hasAttribute(Yt),r=e.hasAttribute("href");if(t||!r)return!1;const n=Oe(e)||e.href||"";if([/\.pdf/,/wp-admin/,/javascript:void/,/^(tel:|mailto:|sms:|ftp:|file:|geo:|news:|irc:|skype:|spotify:|whatsapp:|market:|steam:|git:|svn:|ed2k:|magnet:|gopher:|dict:)/].some((e=>e.test(n))))return!1;let i,o;try{i=new URL(n,document.baseURI),o=e instanceof SVGAElement?i.hostname:e.hostname}catch(a){o=void 0}return!(!i||!["http:","https:"].includes(i.protocol))&&!Jt.some((e=>null==o?void 0:o.includes(e)))},tr="REMEDIATION_PDF_DOCUMENTS",rr="data-uw-pdf-doc",nr="data-uw-pdf-rem",ir="data-uw-pdf-doc-original",or="data-uw-pdf-br",ar="https://cdn.userway.org/";var lr=(e=>(e.INVALID_LINK="0",e.VALID_LINK="1",e.IN_PROCESSING_OR_QUOTA_EXCEEDED="2",e))(lr||{});const sr=e=>{var t,r;if(!e||e.nodeType!==Node.ELEMENT_NODE)return!1;const n=e.nodeName;if("A"!==n&&"IFRAME"!==n)return!1;if(e.hasAttribute(rr))return!1;if(e.hasAttribute(ir))return!1;let i=null;if("A"===n?i=null!=(t=e.href)?t:null:"IFRAME"===n&&(i=null!=(r=e.src)?r:null),!i)return!1;if(i.split("?")[0].match(/\.pdf($|\?)/i))return!0;let o=!1;const a=new URLSearchParams(i);for(const[,l]of a.entries())(null==l?void 0:l.match(/\.pdf($|\?)/i))&&(o=!0);return!!o},ur="data-uw-rm-alt-original",cr="REMEDIATION_IMAGE_MISSING_ALT",dr="data-uw-rm-alt",pr=["icon","cart","logo"],mr=["h1","h2","h3","h4","h5","h6","span","a","p","figcaption","caption","div"],fr=["heading"];var gr=(e=>(e.EXCLUDED_SRC="EXCLUDED_SRC",e.HIDDEN_FROM_SCREEN_READER="HIDDEN_FROM_SCREEN_READER",e.BASE64="BASE64",e.SVG="SVG",e.SMALL_SIZE="SMALL_SIZE",e.MICRO_SIZE="MICRO_SIZE",e.WRONG_SRC="WRONG_SRC",e.ASPECT_RATIO="ASPECT_RATIO",e.CUSTOM_CONFIG="CUSTOM_CONFIG",e.NOT_LOADED="NOT_LOADED",e))(gr||{});const hr=["SVG","SMALL_SIZE","HIDDEN_FROM_SCREEN_READER"],br=["jpg","jpeg","png","gif","bmp","tiff","tif","svg","webp","ico","apng","heif","heic","avif","eps","raw","cr2","nef","orf","sr2"];var Ar=(e=>(e.CorrectAlt="ALT",e.Reverted="RT",e.Backend="BE",e.Excluded="EX",e.ExcludedSrc="EX-SRC",e.Hidden="HD",e.Base64="BS64",e.Svg="SVG",e.Small="SM",e.Micro="MC",e.InvalidSrc="SRC",e.AspectRatio="AR",e.AI="AI",e.AIQuotaExceed="QU",e.ClosestText="CT",e.CustomConfig="CC",e.NotLoaded="NL",e.ThirdParty="TP",e))(Ar||{});const yr=new RegExp(`\\.(${br.join("|")})$`,"i"),Er=/^(data:)/,vr=/\.svg(\?.*)?$/i,wr=/^[!@#$%^&*()_+{}[\]`:;<>,.?~\\|\-="'/]+$/,_r=/[0-9]{5,}/,Nr=["Nkr","Php","Pts","Skr","Ar","Bs","Ft","Kr","Kč","Ls","Lt","Lv","Mk","Mt","R\\$","Rm","Rp","Rs","Zł","\\$","€","£","¥","₹","₽","₺","₩","₪","₴","₫","₡","₢","₣","₤","₥","₦","₧","₨","₭","₮","₯","₰","₱","₲","₳","₵","₶","₷","₸","₼","₾","₿","Ƀ","Ł","৳","฿","៛","₠","₸"],Tr=new RegExp(`^(?:${Nr.join("|")})\\s*\\d+(?:\\.\\d{2})?|\\d+(?:\\.\\d{2})?\\s*(?:${Nr.join("|")})$`,"i"),xr={automaticcoupons:/automaticcoupons/,"shopping.yahoo":/shopping\.yahoo/,shopperapproved:/shopperapproved/,rakuten:/rakuten/,"translate.google":/translate\.google/,"maps.googleapis.com":/maps\.googleapis\.com/,"s.w.org":/s\.w\.org/,avatar:/avatar/,companylogos:/companylogos/,favicon:/favicon/,activecampaign:/lt\.php(.*)?l=open/,aweber:/openrate\.aweber\.com/,bananatag:/bl-1\.com/,boomerang:/mailstat\.us\/tr/,"campaign monitor":/cmail(\d+)\.com\/t\//,"cirrus insight":/tracking\.cirrusinsight\.com/,close:/close\.com\/email_opened/,"constant contact":/rs6\.net\/on\.jsp/,contactmonkey:/contactmonkey\.com\/api\/v1\/tracker/,convertkit:/convertkit-mail\.com\/o/,"critical impact":/portal\.criticalimpact\.com\/c2\//,emarsys:/emarsys\.com\/e2t\/o/,gem:/zen\.sr\/o/,getnotify:/email81\.com\/case/,getresponse:/getresponse\.com\/open\.html/,growthdot:/growthdot\.com\/api\/mail-tracking/,front:/app\.frontapp\.com\/(.*)?\/seen/,hubspot:/t\.(hubspotemail|hubspotfree|signaux|senal|sidekickopen|sigopn)/,icontact:/click\.icptrack\.com\/icp/,intercom:/(via\.intercom\.io\/o)|(intercom-mail\.com\/via\/o)/,litmus:/emltrk\.com/,mailchimp:/list-manage\.com\/track/,mailgun:/email\.(mailgun|mg)(.*)?\/o/,mailjet:/mjt\.lu\/oo/,mailspring:/getmailspring\.com\/open/,mandrill:/mandrillapp\.com\/track/,marketo:/resources\.marketo\.com\/trk/,mixmax:/(email|track)\.mixmax\.com/,mixpanel:/api\.mixpanel\.com\/track/,nethunt:/nethunt\.co(.*)?\/pixel\.gif/,newton:/tr\.cloudmagic\.com/,outreach:/api\/mailings\/opened/,phplist:/phplist\.com\/lists\/ut\.php/,polymail:/polymail\.io/,postmark:/pstmrk\.it\/open/,"return path":/returnpath\.net\/pixel\.gif/,sailthru:/sailthru\.com\/trk/,salesforce:/nova\.collect\.igodigital\.com/,sendy:/sendy\/t\//,streak:/mailfoogae\.appspot\.com/,superhuman:/r\.superhuman\.com/,thunderhead:/na5\.thunderhead\.com/,tinyletter:/tinyletterapp\.com.*open\.gif/,yamm:/yamm-track\.appspot/,yesware:/t\.yesware\.com/,"zendesk sell":/futuresimple\.com\/api\/v1\/sprite\.png/,bing:/bat\.bing\.com/,teads:/cm\.teads\.tv/,arttrk:/arttrk\.com\/pixel/,inmobi:/inmobi\.com\/c.asm/,amazonAdsystem:/(vfw|aax-events-.*?)\.amazon-adsystem\.com/,adeGooglesyndication:/ade\.googlesyndication\.com\/ddm\/activity/,rubiconproject:/rubiconproject\.com\/beacon/,clickagy:/ttd-trackers\.clickagy\.com\/pixel/,bidswitch:/bidswitch\.net/,doubleclick:/ad\.doubleclick\.net\/ddm/,smartadserver:/smartadserver\.com\/(track|h\/maip)/,amplemarket:/(trk|pxl).*?\.amplemarket\.com/,mailtrack:/(mailtrack\.io\/trace)|(mltrk\.io\/pixel)/,sendgrid:/(wf\/open\?upn)|(sendgrid\.net)/,mandrillapp:/mandrillapp\.com\/track/,planapple:/planapple\.com\/track/,sparkpostmail:/(spgo\.io|click\.heml\.io)\/e/},Ir=e=>{const t="img"===e.tagName.toLowerCase(),r=e.hasAttribute(dr);if(!t||r)return!1;return!(e.getAttribute(":src")||e.getAttribute("x-bind:src"))||(e.setAttribute(dr,Ar.Excluded),!1)},Lr=new Set,Or=new Set,Sr=new Set;let Cr=!1,kr=!1,Rr=!1;let Dr;const Mr=(e,...t)=>__async(this,[e,...t],(function*(e,t={}){if(Cr)kr=!0;else{Cr=!0;try{const n=(null!=e?e:Array.from(Lr)).filter((e=>e.isConnected)),i=Array.from(Or).filter((e=>e.isConnected));Lr.clear(),Or.clear();if(0===n.length+i.length)return;for(;n.length>0||i.length>0;){const e=n.splice(0,200),o=200-e.length;o>0&&e.push(...i.splice(0,o));for(const n of Sr)try{yield n(e,t)}catch(r){}yield Le(0)}}finally{Cr=!1,kr&&(kr=!1,Dr())}}}));Dr=Gt((()=>{setTimeout(Mr,0)}),500,{maxWait:2e3,leading:!1,trailing:!0});const Pr=e=>{Sr.add(e)},Ur=(e,t)=>__async(this,null,(function*(){yield new Promise((r=>{setTimeout((()=>__async(this,null,(function*(){yield Mr(e,t),r()}))),0)}))}));var Fr;Fr=e=>{for(const r of e)Ir(t=r)||er(t)||sr(t)?Lr.add(r):Or.add(r);var t;Rr||Dr()},Kt.add(Fr);const Wr={enabled:!1},$r=e=>{const t=UserWayWidgetApp.getLib("util"),{registerPostMessageListener:r}=t;return r((t=>{var r;(null==(r=null==t?void 0:t.data)?void 0:r.isUserWay)&&e(t)}))},Br={"userway:ato-input:enable":()=>{Wr.enabled||(Wr.enabled=!0,Pr(wt),wt())},"userway:ato-input:disable":()=>{var e;Wr.enabled&&(Wr.enabled=!1,e=wt,Sr.delete(e))},"userway:ato-input:get":wt},Hr="REMEDIATION_SCREEN_READER_BASIC",Vr="data-uw-rm-sr",jr="REMEDIATION_EXTERNAL_LINK_TARGETS",qr="data-uw-rm-ext-link",Xr="REMEDIATION_SKIP_NAVIGATION_LINK",Gr=["skip","pass","jump"],Kr="REMEDIATION_VAGUE_LINK",zr="data-uw-rm-vglnk",Yr=["here","click here","clicking","clicking here","download","download now","click","click this","this","link","more","read more","please click here","continue reading","learn more","more details"],Zr="uwAccessibilityEditor",Qr=Ze.editorBuildUrl,Jr="aria-editor",en="data-uw-rm-ae",tn="aria-editor",rn="REMEDIATION_EMPTY_CONTROLS",nn="data-uw-rm-empty-ctrl",on=["facebook","youtube","whatsapp","instagram","twitter","reddit","linkedin","viber","pinterest","telegram","search","cart","home"],an={prev:"Get previous item",next:"Get next item",scroll:"Activate for scroll",top:"Move to top",bottom:"Move to bottom",expand:"Expand this block",collapse:"Collapse this block",close:"Close this option"},ln=[{re:/(fa-)(.+)/,replacer:"$2"}],sn=["a","summary","button"],un="REMEDIATION_FORM_LABEL",cn="data-uw-rm-form",dn=["INPUT","TEXTAREA","SELECT"],pn="data-uw-hidden-control",mn="hidden-control-element",fn={text:"Text field",radio:"Radio button",checkbox:"Checkbox field",email:"Please enter email address",url:"Please enter url",tel:"Please enter a phone number",password:"Password field",search:"Search field",date:"Date field",time:"Time field",image:"Image field",file:"File field",number:"Number",range:"Select range",submit:"Submit button",color:"Select color",datetime_local:"Date and time field",month:"Month field",week:"Week field",button:"Button",reset:"Reset button"},gn=new Map([["Name",/(name)/],["Age",/(age)/],["Search",/(search|srch)/],["Quantity",/(qua|qty|quantity)/],["Count",/(count|cnt)/]]),hn=new Map([["Search",/(search|srch)/],["Select name",/(name)/]]),bn="REMEDIATION_META_VIEWPORT",An="uw-rm-meta-viewport",yn='meta[name="viewport"][content*="maximum-scale"], meta[name="viewport"][content*="user-scalable=0"], meta[name="viewport"][content*="user-scalable=no"]',En="REMEDIATION_HEADING",vn="data-uw-rm-heading",wn='h1, h2, h3, h4, h5, h6, [role="heading"]',_n="Empty heading",Nn="data-uw-rm-title",Tn="REMEDIATION_HEADER_TITLE",xn="un",In="gn",Ln=[Ce],On=e=>e.filter((e=>{var t,r;if(et&&Ln.includes(e.ruleId))return!1;const n=(e=>{switch(e){case cr:return"alt";case Jr:return"ariaEditor";case rn:return"emptyControls";case un:return"forms";case zt:return"brokenLinks";case bn:return"metaViewport";case jr:return"externalLinks";case Xr:return"skipLinks";case Kr:return"vagueLinks";case En:return"headings";case tr:return"pdf";case Tn:return"title";case Hr:return"screenReader";case He:return"customFocus";case Ce:return"keyboardNavigation";default:return null}})(e.ruleId);if(!n||!Ze.paidAi)return!0;const i=ze[n];if(!i)return!0;const o=!1!==(null==(r=null==(t=i.config)?void 0:t.mobile)?void 0:r.enabled);return i.enabled&&(!et||o)})),Sn=(e,t)=>__async(this,null,(function*(){for(const r of e)for(const e of r)yield e(t),yield Le(0)})),Cn="REMEDIATION_PER_SITE",kn=()=>{var e,t;try{const r=UserWayWidgetApp.getLib("util");(null==(e=null==ze?void 0:ze.perSiteRemediation)?void 0:e.enabled)&&(null==(t=null==ze?void 0:ze.perSiteRemediation)?void 0:t.resources)&&r.execJs(ze.perSiteRemediation.resources).finally((()=>{r.fireUserWayLifeCycleEvent("userway:remediation_csr_loaded")}))}catch(r){console.info("CSR",r)}};kn.id=Cn;const Rn=[kn],Dn=e=>e.filter((e=>{var t,r;const n=(e=>{switch(e){case"REMEDIATION_LABS":return"labs";case Cn:return"perSiteRemediation";default:return null}})(e.id);if(!n||!Ze.paidAi)return!1;const i=null==ze?void 0:ze[n];if(!i)return!0;const o=!1!==(null==(r=null==(t=i.config)?void 0:t.mobile)?void 0:r.enabled);return i.enabled&&(!et||o)})),Mn=e=>!(e instanceof HTMLElement)||Q.some((t=>e.hasAttribute(t)))||Z.some((t=>e.classList.contains(t)))||h(e),Pn=(e,t)=>{try{if("childList"===t){const t=[...e.addedNodes].reduce(((e,t)=>{if(t instanceof HTMLElement){const r=[...t.getElementsByTagName("*")];return[...e,...r]}return e}),[]);return[].filter.call([...e.addedNodes,...t],(e=>!Mn(e)))}return"attributes"===t?Mn(e.target)?[]:[e.target]:[]}catch(r){return[]}},Un=document.documentElement,Fn={attributes:!0,attributeFilter:["aria-label","alt"],childList:!0,subtree:!0},Wn=new MutationObserver((e=>{(e=>{for(const r of Kt)try{r(e)}catch(t){}})((e=>{const t=[];for(const r of e)t.push(...Pn(r,r.type));return t})(e))})),$n=Object.freeze({isInitialRun:!1}),Bn=(()=>{let e,t,r=!1,n=!1;const i=(r,...i)=>__async(this,[r,...i],(function*(r,i=$n){const{isInitialRun:o}=i,a=o?[...e,...t]:e;try{yield((e,t)=>{const r=e.map((e=>e.map((e=>e.run))));return Sn(r,t)})(a,r)}catch(l){}finally{o&&!n&&(Dn(Rn).forEach((e=>e())),n=!0)}})),o=()=>__async(this,null,(function*(){if(r)return;r=!0,Pr(i),((e=Un,t=Fn)=>{Ye.tech_rem_on_tab||Wn.observe(e,t);const r=$r((n=>{var i;(null==(i=null==n?void 0:n.data)?void 0:i.type)===a.KeyboardNavEnabled&&(Wn.observe(e,t),r())}))})(),Rr=!0;const e=(()=>{try{const e=Q.map((e=>`[${e}]`)).join(","),t=Q.map((e=>`[${e}] *`)).join(","),r=`iframe,*:not(${f}, ${e}, ${t})`;return[...Array.from(document.body.querySelectorAll(r)),document.documentElement]}catch(e){return console.error(e),[]}})();yield Ur(e,{isInitialRun:!0}),Rr=!1,(Lr.size>0||Or.size>0)&&Dr(),$r((e=>{if(!e.data)return;const{data:{action:t,type:r}}=e;t===dt&&Br[r]&&Br[r]()}))})),l=()=>__async(this,null,(function*(){const e=Ye.tech_rem_in_throttle_ms,t=null==e||Number.isNaN(Number(e))?500:Number(e);yield Le(t)})),s=()=>__async(this,null,(function*(){yield Ie(),yield l(),yield o()}));return{run:i,init:()=>__async(this,null,(function*(){if((()=>{var e;if((null==(e=window.location)?void 0:e.pathname.indexOf("wp-admin"))>-1)return!0;if(!(null==ze?void 0:ze.commonSettings))return!1;const{mobile:t,disabledPages:r}=ze.commonSettings.config;return!(!et||!t||t.enabled)||!!(null==r?void 0:r.some((e=>{var t;return(null==(t=window.location)?void 0:t.href.indexOf(e))>-1})))})())return;let r;r=yield Promise.resolve().then((()=>Js)),e=r.RulesGroups.map((e=>On(e).filter((e=>!(!Ye.new_keyboard_nav&&e.ruleId===Ce)&&!(!Ye.new_popup_helper&&e.ruleId===We))))),t=r.RulesGroupsOnce.map((e=>{const t=On(e),r=[];return Ye.new_focus_rule||r.push(He),r.length?t.filter((e=>!r.includes(e.ruleId))):t})),Ye.tech_rem_on_tab||s();const n=$r((e=>{var t;(null==(t=null==e?void 0:e.data)?void 0:t.type)===a.KeyboardNavEnabled&&(o(),n())}))}))}})();(()=>{__async(this,null,(function*(){yield ot(),Bn.init()}))})(),d.observe(u,c),(()=>{const e=t.find((e=>e.url.includes(window.location.origin)));e&&s(e.name)})();const Hn=({ruleId:e,isTargetElement:t,rule:r,postMessageApi:n,forceRun:i})=>(n&&$r((e=>{const t=null==e?void 0:e.data;if(!t)return;const{type:r,action:i}=t;i!==o.Remediation&&i!==o.AriaEditor||n[r]&&n[r](t.data?t.data:t)})),{run:n=>__async(this,null,(function*(){try{if(!t)return void(yield r({context:{elements:n}}));const o=n.filter((r=>!r.hasAttribute(`uw-ignore-${e}`)&&t(r)));if(!o.length)return void(i&&(yield r({context:{elements:[]}})));yield r({context:{elements:o}})}catch(o){console.warn(o)}})),stop:()=>{},rerun:()=>{},ruleId:e}),Vn=e=>{if(!e)return null;const t=e.split("|")[0];return document.evaluate(t,document,null,XPathResult.FIRST_ORDERED_NODE_TYPE,null).singleNodeValue},jn=e=>!!["input","select","button","textarea","a"].includes(e.tagName.toLowerCase())||["button","checkbox","link","option"].includes((e.getAttribute("role")||"").toLowerCase()),qn=e=>f.split(",").map((e=>e.trim())).some((t=>t===e.toLowerCase())),Xn=(e,t)=>("img"===e?t.getAttribute("alt"):t.getAttribute("aria-label"))||null,Gn=e=>e.getAttribute("role")||null,Kn=e=>e.getAttribute("aria-level")||null,zn=(e,t)=>"img"===e?t.getAttribute("src"):null,Yn=e=>{if(null==e?void 0:e.nextElementSibling){const t=e.nextElementSibling;return qn(t.tagName)?Yn(t):t}return null},Zn=e=>{if(null==e?void 0:e.previousElementSibling){const t=e.previousElementSibling;return qn(t.tagName)?Zn(t):t}return null},Qn=e=>{var t;return null!=(t=e.uwAtoId)?t:null},Jn=e=>{if(!e.parentElement)return null;const{parentElement:t}=e,r=M(t);return _t().find((e=>e.xpath===r))?r:Jn(t)},ei=e=>{const t=Array.from(e.childNodes).find((e=>e.uwAtoId));if(t){const e=M(t);return _t().find((t=>t.xpath===e))?e:null}return null},ti=(e,t)=>{if(!e)return;const r=e,{tabindex:n,el:i}=r,o=__objRest(r,["tabindex","el"]),a=e.el?[...e.el.children]:[],l=t.filter((e=>a.includes(e.el)));if(l.length){const e=l.map((e=>ti(e,t)));return __spreadProps(__spreadValues({},o),{children:e})}return o},ri=(e,t="")=>{const r=[e];e.parentElement&&r.push(e.parentElement);let n=0;const i=(null==e?void 0:e.children)?[...e.children].filter((e=>!qn(e.tagName))).reverse():[];i.length&&(r.unshift(...i),n+=i.length);const o=Yn(e);o&&!r.includes(o)&&(r.splice(n,0,o),n+=1);const a=Zn(e);a&&!r.includes(a)&&r.splice(n+1,0,a);const l=r.map((t=>{const r=t.tagName.toLowerCase(),n=yt(t,!0);if(!n)return null;const{type:i,label:o,id:a}=n,l="function"==typeof t.getAttribute?{label:Xn(r,t),isHidden:(s=t,"true"===s.getAttribute("aria-hidden")||"presentation"===s.getAttribute("role")),role:Gn(t),ariaLevel:Kn(t),src:zn(r,t),isControl:jn(t),focusable:v(t),tabindex:ne(t)}:{};var s;return __spreadValues({tagName:r,text:[...t.childNodes].filter((e=>e.nodeType===Node.TEXT_NODE)).map((e=>{var t;return null==(t=e.textContent)?void 0:t.trim()})).join(" ").trim(),id:a,xpath:M(t),selected:t===e,el:t,semanticType:i,textToRead:o,uwAtoId:Qn(t),accessibleParentXpath:Jn(t),accessibleChildXpath:ei(t)},l)})).filter(Boolean).reverse();if(l){const e=ti(l[0],l);e&&p({action:tn,type:"elements-selected",data:{tree:e,source:t}},[Zr])}};let ni,ii;const oi=(e,t)=>{const r="img"===(null==e?void 0:e.tagName.toLowerCase());t&&!r&&e.setAttribute("aria-label",t)},ai=(e,t)=>{const{tabindex:r,role:n,ariaLevel:i}=t;r&&e.setAttribute("tabindex",r),n&&"no role"!==n?e.setAttribute("role",n):n&&"no role"!==n||e.removeAttribute("role"),i&&e.setAttribute("aria-level",i)},li=Hn({ruleId:Jr,rule:()=>{if(!ze.ariaEditor.enabled)return;const e=(()=>{let e=it().AriaEditorValues;const t=`${D(window.location.pathname)}`;return e=e.filter((e=>!e.page||e.page===t)),e})();if(e)for(const t of e){const e=Vn(t.xpath);if(!e)continue;const r=e.nodeType===Node.ELEMENT_NODE,n=e.hasAttribute(en)&&t.processed;if(!r||n)continue;const{hidden:i,correction:o}=t;i?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden"),oi(e,o),ai(e,t),e.setAttribute(en,""),t.processed=!0}},postMessageApi:{"add-aria-editor":()=>{ii=document.querySelector(`iframe[name=${Zr}]`),ii||(ni=new Promise((e=>{const t={class:"userway_iframe_aria_editor",name:"uwAccessibilityEditor",title:"Accessibility Editor",src:Qr};ii=document.createElement("iframe"),Object.entries(t).forEach((([e,t])=>{null==ii||ii.setAttribute(e,t)})),ii.style="\n z-index: 2147483647;\n position: fixed;\n left: 0;\n top: 0;\n width: 100%!important;\n max-width: 100%!important;\n height: 100%!important;\n max-height: 100%!important;\n visibility: hidden;\n opacity: 0!important;\n border: none;\n display: block;\n ",ii.onload=()=>{e()},ii&&document.body.appendChild(ii)})))},"open-aria-editor":()=>{ni.then((()=>{window.parent.postMessage({action:"close",isUserWay:!0}),window.parent.postMessage({action:"manageIconVisibility",isUserWay:!0,type:"hidden"}),ii&&(ii.style.visibility="visible",ii.style.opacity="1"),p({action:tn,type:"aria-editor-open-request"},[Zr])}))},"close-aria-editor":()=>{window.parent.postMessage({action:"open",isUserWay:!0}),window.parent.postMessage({action:"manageIconVisibility",isUserWay:!0,type:"visible"}),ii&&(ii.style.visibility="hidden",ii.style.opacity="0"),p({action:tn,type:"aria-editor-closed"},[Zr])},"editor-init":()=>{const e=Ze,t=!(!e||!e.CUSTOM_BRANDING&&!e.WHITE_LABEL);p({action:tn,type:"open-aria-editor",data:{siteId:Ze.siteId,showTutorial:!0,whiteLabel:t,hash:D(window.location.pathname)}},[Zr])},"update-aria-hidden":e=>{const{xpath:t,hidden:r}=e;if(!t)return;const n=K(t);(null==n?void 0:n.nodeType)===Node.ELEMENT_NODE&&(r?n.setAttribute("aria-hidden","true"):n.removeAttribute("aria-hidden"),n.setAttribute(en,""))},"update-tabindex":e=>{const{xpath:t,focusable:r,isControl:n}=e;if(!t)return;const i=K(t);(null==i?void 0:i.nodeType)===Node.ELEMENT_NODE&&(n?i[r?"removeAttribute":"setAttribute"]("tabindex","-1"):i[r?"setAttribute":"removeAttribute"]("tabindex","0"),i.setAttribute(en,""))},"update-aria-label":e=>{const{xpath:t,label:r}=e;if(!t||null==r)return;const n=K(t);(null==n?void 0:n.nodeType)===Node.ELEMENT_NODE&&(n.setAttribute("aria-label",e.label),n.setAttribute(en,""))},"update-aria-level":e=>{const{xpath:t,ariaLevel:r}=e;if(!t)return;const n=K(t);(null==n?void 0:n.nodeType)===Node.ELEMENT_NODE&&(r?n.setAttribute("aria-level",r):n.removeAttribute("aria-level"),n.setAttribute(en,""))},"update-role":e=>{const{xpath:t,role:r}=e;if(!t)return;const n=K(t);if((null==n?void 0:n.nodeType)===Node.ELEMENT_NODE){r&&"no role"!==r?n.setAttribute("role",r):n.removeAttribute("role"),n.setAttribute(en,"")}},"select-elements-by-xpath":e=>{const{xpath:t,source:r}=e;if(!t)return;const n=K(t);n&&ri(n,r)},"select-elements-at-point":e=>{const{position:{x:t,y:r}}=e;let n=document.elementsFromPoint(t,r);const i=n.findIndex((e=>e.getAttribute("name")===Zr));-1!==i&&n.splice(i,1),n=n.filter((e=>!["HTML","BODY"].includes(e.tagName))).slice(0,2),n.length&&ri(n[0])},"update-aria-editor-config":e=>{const{page:t="",xpath:r=""}=e,n=it().AriaEditorValues.findIndex((e=>e.page===t&&e.xpath===r)),i=it().AriaEditorValues[n],o=__spreadValues(__spreadValues({},i),(e=>__spreadProps(__spreadValues({},e),{hidden:e.isHidden}))(e));-1!==n?it().AriaEditorValues[n]=o:it().AriaEditorValues.push(o)}}}),si=({currentSrc:e,src:t})=>e||t,ui=e=>{const t=e.getAttribute("width"),r=e.getAttribute("height");if(t&&r){const e=parseFloat(t)||0,n=parseFloat(r)||0;if(e>0&&n>0)return{width:e,height:n}}const{width:n,height:i}=window.getComputedStyle(e),o=/^\d*px?/i,a=n&&o.test(n),l=i&&o.test(i);if(a&&l){const e=parseFloat(n)||0,t=parseFloat(i)||0;if(e>0&&t>0)return{width:e,height:t}}return e.naturalWidth>0&&e.naturalHeight>0?{width:e.naturalWidth,height:e.naturalHeight}:null},ci=(e,t)=>{const r=ui(e);return!!r&&(r.width>t&&r.height>t)},di=(e,{decorative:t,approved:r,fixedByUserWay:n,loadingFromMS:i,quotaExceeded:o})=>{var a;return{src:si(e),alt:e.alt,originalAlt:null!=(a=e.getAttribute(ur))?a:"",decorative:t,approved:r,fixedByUserWay:n,loadingFromMS:i,quotaExceeded:o}},pi=e=>{e.setAttribute("role","presentation"),e.removeAttribute("aria-hidden"),e.setAttribute("alt","")},mi=e=>{if(!e)return"";try{const{hostname:t}=new URL(e);return t.replace(/^https?:\/\//,"").replace(/^www\./,"").replace(/\.[a-zA-Z0-9]*$/,"")}catch(t){return""}},fi=e=>{const t=si(e);return Er.test(t)},gi=e=>{const t=e.trim();if(!t)return!0;if(t.length>500)return!0;if(yr.test(t))return!0;const r=t.split(/\s+/).length;if(_r.test(t)&&1===r||Tr.test(t))return!0;return!!wr.test(t)},{enabled:hi,config:bi}=(null==ze?void 0:ze.alt)||{enabled:!1,config:{}},Ai=null==bi?void 0:bi.decorative,yi=(e,t="selectors")=>{if(!Ai||!hi)return!1;const r=Ai[t];return!!Array.isArray(r)&&r.some((t=>e.matches(t)))},Ei=(e,t)=>{const r=e.alt.trim();if(!t||null===t.alt)return null;const{decorative:n,alt:i,approved:o,reverted:a}=t;if(a&&!n)return e.setAttribute(dr,Ar.Reverted),di(e,{approved:!0,decorative:!r,fixedByUserWay:!1,loadingFromMS:!1});const l=!(!ze||"AUTO"===ze.strategy)&&!o;!n||l||yi(e,"ignoreSelectors")||pi(e);const s=o||!r||gi(r);i&&!l&&s&&!n&&e.setAttribute("alt",i),e.setAttribute(dr,Ar.Backend);const u=di(e,{approved:o,decorative:n,fixedByUserWay:!0,loadingFromMS:!1});return l&&(u.alt=i),u},vi=e=>{const t=ui(e);return null!==t&&t.width>0&&t.height>0},wi=e=>{if(yi(e))return gr.CUSTOM_CONFIG;const t=si(e),r=gi(e.alt),n=vi(e);var i;if(!(i=t)||!i.match(Er)&&![/^https?:\/\/.{1,256}\.[a-z]{2,63}\/.+$/gim,/^https?:\/\/[^:\/\s]{1,256}:\d{1,5}\/.+$/gim].some((e=>e.test(i))))return gr.WRONG_SRC;if(!!n&&!ci(e,10)&&r)return gr.MICRO_SIZE;if(!!n&&(e=>{const t=ui(e);if(!t)return!1;const{width:r,height:n}=t;return r<=20&&n>=10*r||n<=20&&r>=10*n})(e))return gr.ASPECT_RATIO;if(fi(e)&&r)return gr.BASE64;if("true"===e.getAttribute("aria-hidden")||"presentation"===e.getAttribute("role")||"none"===e.getAttribute("role"))return gr.HIDDEN_FROM_SCREEN_READER;if(vr.test(t)&&r)return gr.SVG;return!(!n||ci(e,50))&&r?gr.SMALL_SIZE:null},_i=e=>{switch(e){case gr.ASPECT_RATIO:return Ar.AspectRatio;case gr.BASE64:return Ar.Base64;case gr.EXCLUDED_SRC:return Ar.ExcludedSrc;case gr.SVG:return Ar.Svg;case gr.MICRO_SIZE:return Ar.Micro;case gr.SMALL_SIZE:return Ar.Small;case gr.WRONG_SRC:return Ar.InvalidSrc;case gr.CUSTOM_CONFIG:return Ar.CustomConfig;case gr.NOT_LOADED:return Ar.NotLoaded;case gr.HIDDEN_FROM_SCREEN_READER:default:return Ar.Hidden}},Ni=(e,t,r,n,i)=>{const o=UserWayWidgetApp.getLib("remediation_manager"),a=UserWayWidgetApp.getLib("remediation_helper_outcome");if(!a.of)return;const l=a.of(e,t?{items:t}:null,null!=i?i:null,r,n);o.HelperCallbackAggregator.onHelperRemediationCompleted(l)},Ti=new Map,xi=e=>{const t=M(e);return Ti.get(t)||null},Ii=e=>Ni(cr,e,e.filter((e=>e.approved)).length,e.filter((e=>!e.approved)).length),Li=e=>{e.hasAttribute(ur)||e.setAttribute(ur,e.alt)},Oi=(e,t=[])=>{if(0===e.length)return;const{paidAi:r}=Ze,n=[];for(const i of e){const e=i,o=gi(e.alt),a=si(e),l=xi(e),s=yi(e,"ignoreSelectors");Li(e),vr.test(a)&&r&&e.setAttribute("role","img");const u=t.find((e=>W(e.src).toLowerCase()===W(a).toLowerCase())),c=Ei(e,u);if(c){n.push(c);continue}if(s){e.setAttribute(dr,_i(gr.CUSTOM_CONFIG));continue}if(!r)continue;const d=null==l?void 0:l.shouldBeDecorativeReason;if(!o&&!d){e.setAttribute(dr,Ar.CorrectAlt),n.push(di(e,{approved:!0,decorative:!1,fixedByUserWay:!1}));continue}if(null==l?void 0:l.isThirdParty){pi(e),e.setAttribute(dr,Ar.ThirdParty);continue}if(void 0!==d){pi(e),e.setAttribute(dr,_i(d)),d&&hr.includes(d)&&n.push(di(e,{approved:!1,decorative:!0,fixedByUserWay:!0}));continue}const p=null==l?void 0:l.relevantText;if(p){e.setAttribute("alt",p),e.setAttribute(dr,Ar.ClosestText),n.push(di(e,{approved:!1,decorative:!1,fixedByUserWay:!0}));continue}const{quota:m,usage:f}=Qe;(null==u?void 0:u.metadata.quotaDepleted)||f>=m?(e.setAttribute(dr,Ar.AIQuotaExceed),n.push(di(e,{approved:!1,decorative:!1,fixedByUserWay:!0,quotaExceeded:!0}))):(e.setAttribute(dr,Ar.AI),n.push(di(e,{approved:!1,decorative:!1,fixedByUserWay:!0,loadingFromMS:!0})))}Ii(n)},Si=e=>{const t=e.replace(/^https?:\/\//,"");return document.querySelectorAll(`img[src*="${t}" i],img[srcset*="${t}" i]`)},Ci=e=>__async(this,null,(function*(){const{account:t}=UserWayWidgetApp.ContextHolder.config,{siteId:r}=Ze,{resourceHash:n}=Qe,o=encodeURIComponent(e),a=yield fetch(`${i}api/img-dscr/v2/${t}/${r}/${n}/alts.json?dto=${o}`,{method:"GET",headers:{"Content-Type":"application/json"}});return(yield a.json()).payload})),ki=e=>{const t=`(.*\\.(${br.join("|")}))\\?.*$`,r=new RegExp(t),n=e.match(r);if(!n){const t=new URL(e),r=[];let n=!1;return t.searchParams.forEach(((e,t)=>{br.some((t=>e.endsWith(t)))?n=!0:r.push(t)})),n&&r.forEach((e=>t.searchParams.delete(e))),n?t.toString():e}return n&&n[1]?n[1]:e};var Ri=(e=>(e.RO="RO",e))(Ri||{});const Di=(e,t)=>e.src.localeCompare(t.src),Mi=(e,t=1)=>{if(t>=15)return console.warn("Max split level exceed"),[];const r=((e,t)=>{const r=Math.ceil(e.length/t),n=[];for(let i=0;i8)return Mi(e,t+1);n.push(o)}return n},Pi=["data-lazy-src","data-src","data-lazy"],Ui=e=>"lazy"===e.loading||(e=>Pi.some((t=>e.hasAttribute(t))))(e),Fi=(e,t)=>{pi(e),e.setAttribute(dr,_i(t))},Wi=e=>(t,r)=>{if((e=>e.complete&&0!==e.naturalHeight)(e)||Ui(e))return void t(e);const n=new Image;((e,t,r)=>{e.addEventListener("load",(()=>{t()})),e.addEventListener("error",(()=>{Fi(e,gr.NOT_LOADED),r()}))})(n,(()=>t(e)),(()=>r({image:e,decorativeReason:gr.WRONG_SRC}))),n.src=e.src},$i=e=>(e=>{if("string"!=typeof e)return!1;for(const t of Object.values(xr)){const r=new RegExp(t,"i");if(e.match(r))return!0}return!1})(e.src)?Promise.reject({image:e,decorativeReason:gr.EXCLUDED_SRC}):e.getAttribute("src")||e.getAttribute("srcset")||Ui(e)?new Promise(Wi(e)):Promise.reject({image:e,decorativeReason:gr.WRONG_SRC}),Bi=e=>{const t=(e=>{const t=e.cloneNode(!0);var r;return t.setAttribute(dr,""),(r=t)&&(r.style.setProperty("display","block","important"),r.style.setProperty("opacity","0","important"),r.style.setProperty("visibility","hidden","important"),r.style.setProperty("position","absolute","important"),r.style.setProperty("pointer-events","none","important"),r.style.setProperty("z-index","-999","important"),r.style.setProperty("bottom","0","important")),t})(e);return new Promise((r=>{t.addEventListener("load",(()=>{const e=wi(t);t.remove(),r(e)})),e.addEventListener("error",(()=>{t.remove(),r(null)})),document.body.appendChild(t)}))},Hi=e=>e?e.replace(/\n/g,"").replace(/ {2,}/g," ").trim():"",Vi=(e,t)=>{if(!e)return null;const r="next"===t.type?e.nextSibling:e.previousSibling;if((null==r?void 0:r.nodeType)===Node.TEXT_NODE){if(!Hi(r.nodeValue))return Vi(r,{type:t.type})}return r},ji=e=>{const t=e.nodeType===Node.ELEMENT_NODE,r=e instanceof Element&&"hide"===e.getAttribute("data-uw-rm-heading");if(e.nodeType===Node.TEXT_NODE)return!0;if(t&&!r){const t=mr.some((t=>t===e.nodeName.toLowerCase())),r=fr.some((t=>{var r;return t===(null==(r=e.getAttribute("role"))?void 0:r.toLowerCase())}));return t||r}return!1},qi=Array.from(new Set([...mr,"a","span","strong","em","b","i","q","mark"])),Xi=e=>{if((null==e?void 0:e.nodeType)===Node.TEXT_NODE){const t=Hi(e.nodeValue);if(t&&!gi(t))return t}if((null==e?void 0:e.nodeType)===Node.ELEMENT_NODE&&qi.includes(e.tagName.toLowerCase()))for(const t of e.childNodes){const e=Xi(t);if(e)return e}return null},Gi=e=>{const t=e.nodeType===Node.ELEMENT_NODE,r=e.nodeType===Node.TEXT_NODE;if(!r&&!t)return!1;if(t&&"img"===e.nodeName.toLowerCase())return!0;if(r)return!!Hi(e.textContent);const n=mr.some((t=>t===e.nodeName.toLowerCase())),i=fr.some((t=>{var r;return t===(null==(r=e.getAttribute("role"))?void 0:r.toLowerCase())}));return n||i};let Ki=0;const zi=e=>{const t=e.parentElement;if(!t)return null;if(t.getElementsByTagName("img").length>1)return Ki=0,null;if(1===[].slice.call(t.childNodes).filter(Gi).length)return zi(t);const r=(e=>{let t=Vi(e,{type:"next"}),r=Vi(e,{type:"prev"}),n=null,i=null;for(;t||r;){t&&ji(t)&&(n=Xi(t)),r&&ji(r)&&(i=Xi(r));const e=n||i;if(e)return e;t=Vi(t,{type:"next"}),r=Vi(r,{type:"prev"})}return null})(e);return r?(Ki=0,r):(Ki+=1,"body"===t.tagName.toLowerCase()?(Ki=0,null):Ki<2?zi(t):(Ki=0,null))},Yi=e=>{const t=e.closest("figure");if(t){const e=Array.from(t.children).find((e=>"figcaption"===e.tagName.toLowerCase()));if(e){const t=Hi(e.textContent);if(t&&!gi(t))return t}}const r=[].slice.call(e.classList).join(" "),n=e.id||"",i=(o=r+n).trim()&&pr.find((e=>o.includes(e)))||null;var o;if(i)return i;const a=zi(e);return a||null},Zi=e=>__async(this,null,(function*(){const t=[],r=[],n=(e=>{var t,r;const n=[];for(const i of e){const e=si(i),t=mi(e);if(t){let e=n.find((e=>e.name===t));e||(e={name:t,weight:0},n.push(e)),e.weight+=1}}return null!=(r=null==(t=n.sort(((e,t)=>e.weight__async(this,null,(function*(){const i=e,o=((e,t)=>{if(!vi(e))return!1;const r=si(e);return mi(r)!==t&&!ci(e,20)})(i,n);let a=wi(i);const l="none"===window.getComputedStyle(i).display;a||!l||Ui(i)||o||(a=yield Bi(i));const s=gi(i.alt),u=a&&!hr.includes(a)||o||fi(i)||yi(i,"ignoreSelectors"),c={};if(a&&(c.shouldBeDecorativeReason=a),o&&(c.isThirdParty=o),u)r.push(i);else{if(s){const e=Yi(i);e&&(c.relevantText=e)}t.push(i)}Object.keys(c).length&&((e,t)=>{const r=M(e);Ti.set(r,t)})(i,c)}))))),{imagesForBE:t,imagesNotForBE:r}})),Qi=[],Ji=e=>__async(this,null,(function*(){const t=(e=>{const t=e,r=t.filter(((e,r)=>r===t.findIndex((t=>si(e)===si(t))))).map((e=>{const t=e,r=t.alt.trim(),n=r&&!gi(r),i=si(t),o=xi(t);return{src:ki(i),alt:t.alt.trim(),dir:n||(null==o?void 0:o.shouldBeDecorativeReason)||(null==o?void 0:o.relevantText)?Ri.RO:void 0}}));return r.sort(Di),r})(e),r=Mi(t);r.length&&(yield Promise.all(r.map((t=>__async(this,null,(function*(){try{const r=yield Ci(t);if(!r)return;const{missingAlts:n}=r,i=((e,t)=>e.filter((e=>t.some((t=>W(t.src)===W(si(e)))))))(e,n);Oi(i,n)}catch(r){console.error("Get missing alts error: ",r)}}))))))})),eo=(e,t)=>__async(this,null,(function*(){if(Qe&&"ALTS_OFF"!==Qe.state)try{const{imagesForBE:t,imagesNotForBE:r}=yield Zi(e);Oi(r),yield Ji(t),Qi.length=0}catch(r){console.error("Error during image alt rule processing:",r)}finally{t()}})),to=Gt(((e,t)=>eo(e,t)),1e3,{maxWait:2e3,leading:!1,trailing:!0}),ro=Hn({ruleId:cr,rule:({context:{elements:e}})=>new Promise((t=>{const r=e.reduce(((e,t)=>{const r=$i(t);return r?[...e,r]:e}),[]);let n=0;const i=r.map((e=>e.then((e=>{Qi.push(e),to(Qi,t)})).catch((({image:e,decorativeReason:t})=>{Fi(e,t),n++}))));Promise.all(i).then((()=>{r.length===n&&t()}))})),isTargetElement:Ir,postMessageApi:{"image-alt-update":({src:e,decorative:t,alt:r,role:n})=>{const i=Si(e);if(i.length){for(const e of i)e.setAttribute("alt",null!=r?r:""),t?pi(e):("presentation"!==e.getAttribute("role")&&"none"!==e.getAttribute("role")||e.removeAttribute("role"),e.hasAttribute("aria-hidden")&&e.removeAttribute("aria-hidden")),["link","button","heading"].includes(n)&&e.setAttribute("aria-label",r);Ii([di(i[0],{approved:!0,decorative:t,fixedByUserWay:!1})])}},"image-alt-revert":({src:e})=>{const t=Si(e);for(const r of t){const e=r.getAttribute(ur);null!==e&&r.setAttribute("alt",e)}}}}),no=e=>{const{tagName:t}=e;return"SELECT"===t||"TEXTAREA"===t?t.toLowerCase():"text"},io=e=>{const t=e.getAttribute("id");if(!t)return null;try{return document.querySelector(`label[for='${t}']`)}catch(r){return null}},oo=e=>{const t="string"==typeof e?e:e.textContent;return t&&t.replace(/\r\n|\r|\n|\t/g," ").replace(/( )+/g," ").trim()},ao=(e,t)=>{for(const[r,n]of t)if(n.test(e))return r;return""},lo=e=>{let t="";const r=e.getAttribute("placeholder"),n=e.getAttribute("title");if(r&&r.trim())return r;if(n&&n.trim())return n;const{classList:i,name:o,tagName:a,type:l}=e,s=`${[...i].join(" ")||""} ${o||""}`.trim();return"text"===l&&(t=ao(s,gn)),"SELECT"===a&&(t=ao(s,hn)),t||(e=>{const{tagName:t,type:r}=e;return"SELECT"===t?"select-multiple"===r?"Multiple select":"Single select":"TEXTAREA"===t?"Text area":"INPUT"===t&&r&&fn[r.replace("-","_")]?fn[r.replace("-","_")]:""})(e)},so=e=>{if(e.parentElement){const t=[...e.parentElement.querySelectorAll("label")];if(1===t.length&&(e=>{const t="LABEL"===e.tagName,r=e.getAttribute("for");return t&&(!(null==r?void 0:r.trim())||!document.getElementById(r))})(t[0]))return t[0].textContent}return null},uo=e=>{const t=e.previousElementSibling;return t&&(e=>{var t;return["DIV","SPAN","P"].includes(e.tagName)&&Boolean(null==(t=e.textContent)?void 0:t.trim())})(t)?(ze.strategy===lt&&((e,t)=>{const r=t.getAttribute("id")||k();t.setAttribute("id",r),e.setAttribute("aria-labelledby",r)})(e,t),t.textContent):null},co=({element:e,accessibleName:t,isRequired:r,isAutoStrategy:n=!0})=>{if(!n)return;const i=e.closest("label"),o=io(e);r?(e.setAttribute("required",""),e.setAttribute("aria-required","true")):(e.removeAttribute("required"),e.removeAttribute("aria-required"));const a=i||o,l=e.hasAttribute("aria-labelledby")&&document.getElementById(e.getAttribute("aria-labelledby"));if(a){const e=a.querySelector("span[data-uw-reader-element]");if(e)e.textContent=t;else{const e=R(t);a.appendChild(e)}}else l||e.setAttribute("aria-label",t)},po=e=>{const t=e.getAttribute("aria-labelledby");if(t){const e=(e=>{var t;const r=e.split(" "),n=[];for(const i of r){const e=null==(t=document.getElementById(i))?void 0:t.textContent;e&&n.push(e)}return n.join(" ")})(t);if(e){const t=oo(e);if(t)return t}}const r=e.getAttribute("aria-label");if(r){const e=oo(r);if(e)return e}const n=e.closest("label");if(n){const e=(e=>{let t=e.textContent||"";const r=e.querySelector("select");if(r){const e=r.textContent||"";t=t.replace(e,"")}return t.trim()})(n);if(e)return oo(e)}const i=io(e);if(i){const e=oo(i);if(e)return e}return null},mo=(e,t,r,n)=>{const{Forms:i}=it(),o=po(e),a=i.find((({xpath:e,approved:t})=>t&&+e===D(r)));return o&&(e=>{const t=io(e);if(!t)return!1;const{display:r,visibility:n}=getComputedStyle(t);return"none"===r||"hidden"===n})(e)&&e.setAttribute("aria-label",o),a?(co({element:e,accessibleName:a.correction,isRequired:a.required}),{type:a.type,xpath:r,required:a.required,correction:a.correction,approved:a.approved,xpathHash:D(r),label:o}):o?(e.setAttribute(cn,"nfx"),{type:t,xpath:r,correction:o,approved:!0,xpathHash:D(r),label:o,required:n}):null},fo=e=>{N(e,{skipCheckingOutOfView:!0})||(e.setAttribute("aria-label",mn),e.setAttribute(pn,mn),z(e,(()=>{e.hasAttribute(pn)&&e.hasAttribute("aria-label")&&e.getAttribute(pn)===e.getAttribute("aria-label")&&(e.removeAttribute(pn),e.removeAttribute("aria-label"))})));const t=so(e);if(t)return t;const r=uo(e);if(r)return r;const n=lo(e);return n||null},go=Hn({ruleId:un,rule:({context:{elements:e}})=>{const t=[];for(const r of e){r.setAttribute(cn,"fx");const e=r.hasAttribute("required"),n=ze.strategy===lt,i=M(r),o=no(r),a=mo(r,o,i,e);if(a){t.push(a);continue}const l=fo(r);l?(co({element:r,accessibleName:l,isRequired:e,isAutoStrategy:n}),t.push({type:o,xpath:i,correction:l,approved:!1,xpathHash:D(i),label:null,required:e})):t.push({type:o,xpath:i,correction:null,approved:!1,xpathHash:D(i),label:null,required:e})}Ni(un,t,t.filter((e=>e.approved)).length,t.filter((e=>!e.approved)).length)},isTargetElement:e=>{const t=dn.includes(e.tagName);if(e.hasAttribute(cn)||!t)return!1;const r=e.getAttribute("type");return!("SELECT"!==e.tagName&&"TEXTAREA"!==e.tagName&&("INPUT"!==e.tagName||"hidden"===r))},postMessageApi:{"form-label-update":({correction:e,required:t,xpath:r})=>{const n=K(r.toString());n&&(e&&(n.setAttribute("aria-label",e),n.removeAttribute("aria-labelledby")),t?(n.setAttribute("required",""),n.setAttribute("aria-required","true")):(n.removeAttribute("required"),n.removeAttribute("aria-required")))}}}),ho=e=>{if(!e.hasAttribute("href"))return null;const t=e.getAttribute("href").toLowerCase().match(/^https?:\/\/(?:www\.)?([^/?#]+)/);return t?t[1]:null},bo={},Ao=e=>{const t=e.tagName.toLowerCase(),r=null==e?void 0:e.type,n=e.getAttribute("role");return"summary"===t?"":["a","button"].includes(t)?"a"===t?"":"